package com.xwaf.platform.web.controller.x;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.xwaf.platform.common.api.CommonResponse;
import com.xwaf.platform.common.web.BaseController;
import com.xwaf.platform.system.api.request.ValidatorRequest;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import springfox.documentation.annotations.ApiIgnore;

@ApiIgnore
@RestController
@Api(tags = "Validator", hidden = true)
@RequestMapping(value = "/x/vali")
public class ValidatorController extends BaseController {

	@ApiOperation(value = "check")
	@PostMapping(value = "/check", produces = "application/json;charset=UTF-8")
	public CommonResponse check(@RequestBody @Validated ValidatorRequest request) throws Exception {
		System.out.println(request.getName());
		System.out.println(request.getPassword());
		System.out.println(request.getPhone());
		return CommonResponse.createCommonResponse();
	}
}
